package com.ellecity06.cwhiskymall.adapter

import android.view.LayoutInflater
import android.view.ViewGroup
import com.ellecity06.common.base.BaseAdapter
import com.ellecity06.cwhiskymall.bean.response.SearchDiscoveryResponse
import com.ellecity06.cwhiskymall.databinding.ItemSearchDiscoverTagBinding

/**
 * @author ellecity06
 * @time 2024/11/1 18:49
 * @des
 */
class SearchDiscoverAdapter : BaseAdapter<SearchDiscoveryResponse.HotSearchTerm, ItemSearchDiscoverTagBinding>() {
    override fun inflateBinding(
        layoutInflater: LayoutInflater,
        parent: ViewGroup,
        viewType: Int
    ): ItemSearchDiscoverTagBinding {
        return ItemSearchDiscoverTagBinding.inflate(layoutInflater, parent, false)
    }

    override fun convert(binding: ItemSearchDiscoverTagBinding, position: Int, item: SearchDiscoveryResponse.HotSearchTerm) {
        binding.tvTag.text = item.term
    }
}